package com.joysuch.wwyt.common.enums;

import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;

public enum WfProcessStatusEnum {

    FINISHED("完成", "finished"),
    TERMINATE("已终止", "terminate")
    ;

    private String name;
    private String code;

    WfProcessStatusEnum(String name, String code) {
        this.name = name;
        this.code = code;
    }

    private static final List<String> lookup = new ArrayList<>();

    static {
        for (WfProcessStatusEnum e : EnumSet.allOf(WfProcessStatusEnum.class)) {
            lookup.add(e.code);
        }
    }
    public static List<String> getAllStatus(){
        return lookup;
    }

    public String getName() {
        return name;
    }

    public String getCode() {
        return code;
    }
}
